package com.cgbl.cg.adapter

import androidx.appcompat.widget.AppCompatImageView
import com.cgbl.cg.R
import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.robot.base.configs.AppConstants
import com.robot.base.util.arouter.ARouterUtil
import com.robot.base.utils.pic.ImageLoaderUtils

class ClassificationImgAdapter: BaseQuickAdapter<String, BaseViewHolder>(R.layout.app_item_classification_img) {
    override fun convert(holder: BaseViewHolder, item: String) {
        holder.setText(R.id.item_tv_name, item)
        val ivImg = holder.getView<AppCompatImageView>(R.id.item_iv_img)
        ImageLoaderUtils.displayRound(context, ivImg, R.mipmap.app_ic_bg_1, 4)

        holder.itemView.setOnClickListener {
            ARouterUtil.goToActivity(AppConstants.Router.PROJECT.A_PROJECT_MENU)
        }
    }
}